package com.pang.gulimall.member.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author： pang-yun
 * @date： 2022-02-23 15:40
 * Description:
 */

@RequestMapping("/config")
@RestController
@RefreshScope
public class NacosConfigTestController {

    @Value("${member.username}")
    private String username;

    @Value("${member.password}")
    private String password;


    @GetMapping("/user")
    public String getUser(){
        return username+"  "+password;
    }


}
